package utils

import (
	"net/http"

	"github.com/gin-gonic/gin"
)

func SetSuccessResponse(ctx *gin.Context, data interface{}) {
	ctx.JSON(
		http.StatusOK, gin.H{
			"msg":  "success",
			"data": data,
		},
	)
}

func SetFailResponse(ctx *gin.Context, code int, msg string, data interface{}) {
	ctx.JSON(code, gin.H{
		"msg":  msg,
		"data": data,
	},
	)
}
